package com.jsyl.lwbk.business.mapper;

import com.jsyl.lwbk.business.domain.CourseChildProject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CourseChildProjectMapper {

    List<CourseChildProject> findListByCourse(@Param("childCourseId") Long childCourseId);

    int update(CourseChildProject courseChildProject);

    int saveProject(CourseChildProject courseChildProject);

    int saveAllLink(CourseChildProject courseChildProject);

    int saveProjectByCourseId(CourseChildProject courseChildProject);

    int insert(CourseChildProject courseChildProject);

    /**
     * 更新项目训练量
     * @param courseChildProject
     * @return
     */
    int saveTrainAmount(CourseChildProject courseChildProject);

    /**
     * 获取学生上课项目
     * @param childCourseId
     * @param childId
     * @return
     */
    String getLinkProject(@Param("childCourseId") Long childCourseId,
                          @Param("childId") Long childId);


    CourseChildProject selectOne(@Param("childCourseId") Long childCourseId,
                          @Param("childId") Long childId);


    CourseChildProject selectById(@Param("id") Long Id);

    CourseChildProject selectNotNullOne(@Param("childCourseId") Long childCourseId);

    /**
     * 获取当节课训练包环节项目
     * @param childCourseId
     * @return
     */
    CourseChildProject getTrainPackageProject(@Param("childCourseId") Long childCourseId);

    Integer getLinkRuleType(@Param("childCourseId") Long childCourseId,
                            @Param("linkNo") Integer linkNo);


    int cancelPrepare(@Param("childCourseId") Long childCourseId);

    int delProject(@Param("classId") Long classId,@Param("dayTime") String dayTime);

}
